<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <title>CruiseControl.NET : Using CruiseControl.NET with Vil</title>
	    <link rel="stylesheet" href="styles/site.css" type="text/css" />
        <META http-equiv="Content-Type" content="text/html; charset=UTF-8">	    
    </head>

    <body>
	    <table class="pagecontent" border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#ffffff">
		    <tr>
			    <td valign="top" class="pagebody">
				    <div class="pageheader">
					    <span class="pagetitle">
                            CruiseControl.NET : Using CruiseControl.NET with Vil
                                                    </span>
				    </div>
				    <div class="pagesubheading">
					    This page last changed on Mar 09, 2005 by <font color="#0050B2">mroberts</font>.
				    </div>

				    <p>This page shows how you can integrate <a href="http://www.1bot.com/">Vil</a>, a code metrics tool, into your CruiseControl .NET build.</p>

<p>This update was provided by Wojciech Zimirski.</p>

<h2><a name="UsingCruiseControl.NETwithVil-RunVilaspartofyourintegration"></a>Run Vil as part of your integration</h2>

<p>After downloading and installing VIL, you have to setup your project to generate VIL report.<br/>
If you are using NAnt for building your project then add the following to your NAnt build:</p>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-xml"><span class="code-tag">&lt;property name=<span class="code-quote">"vil.assemblies"</span> value=<span class="code-quote">"comma,separated,list,of,assemblies,to,analyze (full path)"</span> /&gt;</span>

    <span class="code-tag">&lt;target name=<span class="code-quote">"vil"</span>&gt;</span>
        <span class="code-tag">&lt;exec program=<span class="code-quote">"${vil.executable}"</span> commandline='/a=<span class="code-quote">"${vil.assemblies}"</span> /outxml=<span class="code-quote">"${results.dir}results-vil.xml"</span> /m classes,enumerations,structs,types,LOC,events,impInterfaces,WMC,DIT,CBO,RFC,NOC,constructors,methods,imps,fields,properties /sc=type' failonerror=<span class="code-quote">"false"</span>/&gt;</span>
    <span class="code-tag">&lt;/target&gt;</span></pre>
</div></div>

<p>The next step is to merge the Vil report file into the integration result using the <a href="File Merge Task.html" title="File Merge Task">File Merge Task</a>. Your <a href="CruiseControl.NET Server.html" title="CruiseControl.NET Server">CruiseControl.NET Server</a> config file will have something in it like :</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-xml"><span class="code-tag">&lt;tasks&gt;</span>
    <span class="code-tag">&lt;merge&gt;</span>
        <span class="code-tag">&lt;files&gt;</span>
            <span class="code-tag">&lt;file&gt;</span>d:\your\project\build\reports\results-vil.xml<span class="code-tag">&lt;/file&gt;</span>
            <span class="code-tag"><span class="code-comment">&lt;!-- Other files to merge for your build would also be included here --&gt;</span></span>
      	<span class="code-tag">&lt;/files&gt;</span>
    <span class="code-tag">&lt;/merge&gt;</span>
<span class="code-tag">&lt;/tasks&gt;</span></pre>
</div></div>

<h2><a name="UsingCruiseControl.NETwithVil-ConfiguretheWebDashboardtoshowVilresults"></a>Configure the Web Dashboard to show Vil results</h2>

<p>To show Vil results on the Web Dashboard, use a <a href="XSL Report Build Plugin.html" title="XSL Report Build Plugin">XSL Report Build Plugin</a> with the <a href="XSL Files.html" title="XSL Files">XSL File</a> <tt>vil.xsl</tt>. Refer to the <a href="Web Dashboard.html" title="Web Dashboard">Web Dashboard</a> documentation for help on adding new plugin configuration.</p>

				    
                    			    </td>
		    </tr>
	    </table>
	    <table border="0" cellpadding="0" cellspacing="0" width="100%">
			<tr>
				<td height="12" background="http://confluence.public.thoughtworks.org//images/border/border_bottom.gif"><img src="images/border/spacer.gif" width="1" height="1" border="0"/></td>
			</tr>
		    <tr>
			    <td align="center"><font color="grey">Document generated by Confluence on Sep 29, 2009 20:59</font></td>
		    </tr>
	    </table>
    </body>
</html>